/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package padroes_3;

import java.util.Random;

/**
 *
 * @author Delvoux
 */
public class FactoryContaPoupanca extends FactoryConta{

    public Conta criaConta() {
        ContaPoupanca c =  new ContaPoupanca();
        Banco b = Banco.getInstancia();
        Random randomico = new Random();
        c.aplicarFundoDeInvestimento(b.getInvestimentos().get(randomico.nextInt(b.getInvestimentos().size())));
        return c;
    }

}
